projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
509dec9
)
; Another protection from out-of-bounds access to it->stack[].
author
Eli Zaretskii
<eliz@gnu.org>
Sun, 5 Dec 2021 16:03:40 +0000
(18:03 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Sun, 5 Dec 2021 16:03:40 +0000
(18:03 +0200)
src/xdisp.c
patch
|
blob
|
history
diff --git
a/src/xdisp.c
b/src/xdisp.c
index 45b502590d11374a16c713ba6e377c45dc0a827a..0ff6286af7453f20f56eb684cc07c5d8601ebb3e 100644
(file)
--- a/
src/xdisp.c
+++ b/
src/xdisp.c
@@
-30289,7
+30289,8
@@
produce_stretch_glyph (struct it *it)
Compute the width of the characters having this `display'
property. */
struct it it2;
- Lisp_Object object = it->stack[it->sp - 1].string;
+ Lisp_Object object =
+ it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
unsigned char *p = (STRINGP (object)
? SDATA (object) + IT_STRING_BYTEPOS (*it)
: BYTE_POS_ADDR (IT_BYTEPOS (*it)));